package com.xtz.mapper;

import com.xtz.domain.Dish;
import com.xtz.domain.DishFlavor;
import com.xtz.domain.SetMeal;
import com.xtz.domain.SetmealDishes;
import com.xtz.vo.DishVo;
import com.xtz.vo.SetmealVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * date: 2022/5/9 21:12
 *
 * @author xietianze
 */
@Mapper
@Repository
public interface SetmealMapper {
    /**
     * 添加套餐
     * @param setMeal
     * @return
     */

    int addSetmeal(SetMeal setMeal);


    /**
     * 添加套餐菜品
     * @param setmealDishes
     * @return
     */
    int addSetmealDishes(SetmealDishes setmealDishes);

    /**
     * 分页查询
     */
    List<SetmealVo> page(@Param("page")Integer page,@Param("pageSize") Integer pageSize,@Param("name")String name);

    /**
     * 总条数
     * @param name
     * @return
     */
    Long selectCountByName(@Param("name") String name);


    int deletesetmealByIds(@Param("ids") List<String> ids);
    int deletesetmealdishesByIds(@Param("ids") List<String> ids);

    int updatestatus(@Param("status") Integer status,@Param("ids") List<String> ids);

    SetMeal selectById(@Param("id") String id);

    List<SetmealDishes> selectBysetmealId(String setmealId);

    int deletesetmealdishesById(String setmealId);

    int updatasetmeal(SetMeal setMeal);

    List<SetMeal> getList(@Param("categoryId")String categoryId, @Param("status")Integer status);

}
